﻿
/*----------------------------------------------------------------//
// 文件名：MoActLog.cs
// 文件功能描述：实体 MoActLog.
// 
// 创建标识：2009-02-27
//
// 修改标识：
// 修改描述：
//----------------------------------------------------------------*/
#region MoActLog
using System;
using System.Data;
using System.Globalization;
using System.Text;
using System.Xml;
using System.Data.Common;
namespace EQT.Model
{
	/// <summary>
	/// 业务实体MoActLog
	/// </summary>
	public partial class MoActLog:ICloneable
	{
		#region 表ActLog的字段
		private int _log_id;
		private string _uid;
		private string _act_code;
		private DateTime _act_time;
		private string _act_info;
		#endregion
		
		#region 构造函数
		public MoActLog()
		{
		    
		    
		    
		    _act_time= DateTime.Now;
		    
		}
		#endregion
		
		#region 拷贝构造函数

		public MoActLog(MoActLog item)
		{
			item.CopyTo(this);
		}
		#endregion
		
		#region 带参数构造函数
	    public MoActLog(int log_id,string uid,string act_code,DateTime act_time,string act_info)
		{
		this._log_id=log_id;
		this._uid=uid;
		this._act_code=act_code;
		this._act_time=act_time;
		this._act_info=act_info;
		}
		#endregion
		
		#region 表ActLog的字段属性
		/// <summary>
		/// LOG_ID
		/// </summary>
		public int Log_Id
		{
			get {return _log_id;}
			set {_log_id=value;}
		}
		/// <summary>
		///用户ID默认等于人员编码。如：   人员序号1，人员编码 E0001,姓名 张明   对应用户表 的用户ID就是E0001.
		/// </summary>
		public string Uid
		{
			get {return _uid;}
			set {_uid=value;}
		}
		/// <summary>
		/// ACT_CODE
		/// </summary>
		public string Act_Code
		{
			get {return _act_code;}
			set {_act_code=value;}
		}
		/// <summary>
		/// ACT_TIME
		/// </summary>
		public DateTime Act_Time
		{
			get {return _act_time;}
			set {_act_time=value;}
		}
		/// <summary>
		/// ACT_INFO
		/// </summary>
		public string Act_Info
		{
			get {return _act_info;}
			set {_act_info=value;}
		}
		#endregion
		
		#region 辅助函数
		/// <summary>
		/// 拷贝函数
		/// </summary>
		public MoActLog CopyTo(MoActLog item)
        {
		    item.Log_Id=this.Log_Id;
		    item.Uid=this.Uid;
		    item.Act_Code=this.Act_Code;
		    item.Act_Time=this.Act_Time;
		    item.Act_Info=this.Act_Info;
			return item;
        }
		/// <summary>
		/// 克隆函数
		/// </summary>		
		public object Clone()
        {
            MoActLog NewActLog=new MoActLog();
		    NewActLog._log_id=this._log_id;
		    NewActLog._uid=this._uid;
		    NewActLog._act_code=this._act_code;
		    NewActLog._act_time=this._act_time;
		    NewActLog._act_info=this._act_info;
			return NewActLog;
		}
		
		private static MoActLog _empty = new MoActLog(-1,string.Empty,string.Empty,DateTime.MinValue,string.Empty);
        public static MoActLog Empty
        {
            get
            {
                return _empty;
            }
        }
		
		///<summary>
		///判断对象是否相等
		///<summary>
		public override bool Equals(object obj)
        {
            if (base.Equals(obj))
            {
                return true;
            }
            else
            {
                MoActLog NewActLog = obj as MoActLog;
                if (NewActLog == null)
                {
                    return false;
                }
                else
                {
				if (NewActLog.Log_Id==this.Log_Id && NewActLog.Uid==this.Uid && NewActLog.Act_Code==this.Act_Code && NewActLog.Act_Time==this.Act_Time && NewActLog.Act_Info==this.Act_Info)		
					{
                        return true; 
                    }
                }

            }
            return false;
            
        }
		///TODO:you should modify GetHashCode by yourself.
		public override int GetHashCode()
		{
			return base.GetHashCode();
		} 

		public override string ToString()
        {
		   return String.Format("Log_Id={0}/Uid={1}/Act_Code={2}/Act_Time={3}/Act_Info={4}",_log_id,_uid,_act_code,_act_time,_act_info);
		 
		}
		#endregion
		
		#region DataTable Help Function
		///<summary>
		///DataRow转换成Model
		///</summary>
		public void Row2Model(DataRow row)
		{
		    if(row["LOG_ID"]!=null && row["LOG_ID"]!=DBNull.Value)
			{
			    this.Log_Id = (int)row["LOG_ID"];
			}
			else
			{
				this.Log_Id =-1;
			}
		    if(row["UID"]!=null && row["UID"]!=DBNull.Value)
			{
			    this.Uid = (string)row["UID"];
			}
			else
			{
				this.Uid =string.Empty;
			}
		    if(row["ACT_CODE"]!=null && row["ACT_CODE"]!=DBNull.Value)
			{
			    this.Act_Code = (string)row["ACT_CODE"];
			}
			else
			{
				this.Act_Code =string.Empty;
			}
		    if(row["ACT_Time"]!=null && row["ACT_Time"]!=DBNull.Value)
			{
			    this.Act_Time = (DateTime)row["ACT_Time"];
			}
			else
			{
				this.Act_Time =DateTime.MinValue;
			}
		    if(row["ACT_INFO"]!=null && row["ACT_INFO"]!=DBNull.Value)
			{
			    this.Act_Info = (string)row["ACT_INFO"];
			}
			else
			{
				this.Act_Info =string.Empty;
			}
		}
		
		///<summary>
		///Model转换成DataRow
		///</summary>
	　　public void Model2Row(DataRow row)
		{
			row["LOG_ID"] = this.Log_Id;
			row["UID"] = this.Uid;
			row["ACT_CODE"] = this.Act_Code;
			row["ACT_Time"] = this.Act_Time;
			row["ACT_INFO"] = this.Act_Info;
		}
		#endregion
	}
}
#endregion
